{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<h1>Common Ground</h1>\n",
    "Much of the treatment of random variables (RV) makes a distinction between **discrete** and **continous** random variables. For example, discrete RVs are associated with a probability **mass** function (PMF) that is a function from a discrete value, i.e. a possible outcome, and the probability that the RV takes that outcome. Continuous RVs are associated with a probability **density** function (PDF) that is a function from any value on the real line to the probability **density** of the RV at that value (thought of as the density per unit length). \n",
    "\n",
    "The **cumulative distribution function** (CDF) is a single concept that applies to all RVs. The CDF of a RV *X*, denoted $F_X\\hspace{1pt}$ defines the probability $P\\left(X\\le x\\right)\\hspace{1pt}$\n",
    "\n",
    "$$F_X\\left(x\\right) = P\\left(X\\le x\\right) =  \\left\\{ \\begin{eqnarray} \\sum_{k\\le x} p_X\\left(k\\right) &,& \\quad \\mbox{if}\\hspace{3pt} X \\hspace{2pt} \\mbox{is discrete} \\cr\n",
    "\\int_{-\\infty}^x f_X\\left(t\\right)dt&,& \\quad \\mbox{if}\\hspace{3pt} X \\hspace{2pt} \\mbox{is continuous} \\end{eqnarray}\\right.$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<h2>Properties of the CDF</h2>\n",
    "\n",
    "If *X* is discrete and takes integer values, the PMF and the CDF can be obtained as\n",
    "\n",
    "$$F_X\\left(k\\right) = \\sum_{i=-\\infty}^k p_X\\left(i\\right)$$\n",
    "\n",
    "$$p_X\\left(k\\right) = P\\left(X\\le k\\right) - P\\left(X \\le k-1\\right) = F_X\\left(k\\right) - F_X\\left(k-1\\right)$$\n",
    "\n",
    "for all integers *k*.\n",
    "\n",
    "If *X* is a continuous RV, the PDF and CDF can be obtained as\n",
    "\n",
    "$$F_X\\left(x\\right) = \\int_{-\\infty}^x f_X\\left(t\\right)dt$$\n",
    "\n",
    "$$f_X\\left(x\\right) = \\frac{dF_X}{dx}\\left(x\\right)$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<h3>Example: PMF/PDF For Maximum of Several Random Variables</h3>\n",
    "\n",
    "Consider the set of random variables $\\mathbf{X}=\\left\\{X_1,\\ldots,X_N\\hspace{1pt}\\right\\}$ where the random variables in **X** *are independent*. Let *Z* be the random variable equal to the maximum value over the set **X** for a given observation of **X**. We can obtain the PMF or PDF of **Z** by first considering the CDF\n",
    "\n",
    "$$\\begin{eqnarray}F_Z\\left(z\\right) &=& P\\left(X_1\\le z\\right)\\ldots P\\left(X_N \\le z\\right) \\cr\n",
    "&=& F_{X_1}\\left(z\\right)\\ldots F_{X_N}\\left(z\\right)\\end{eqnarray}$$\n",
    "\n",
    "By the properties of the CDF, the PMF or PDF can be obtained. \n",
    "\n",
    "Consider the case where **X** consists of two *independent Normal random variables* with means $\\mu_i = 0, 3\\hspace{2pt}$ respectively and variances $\\sigma^2 = 1, 16\\hspace{2pt}$ respectively and let **Z** be the maximum of **X**. \n",
    "\n",
    "Recall that for an arbitrary *Gaussian* random variable *X* with mean $\\mu\\hspace{1pt}$ and standard deviation $\\sigma\\hspace{1pt}$ we have\n",
    "\n",
    "$$F_X\\left(x\\right) = \\Phi \\left(\\frac{x-\\mu}{\\sigma}\\right)$$\n",
    "\n",
    "where \n",
    "\n",
    "$$\\Phi\\left(x\\right) = \\frac{1}{\\sqrt{2\\pi}}\\int_{-\\infty}^x e^{-t^2/2}dt$$\n",
    "\n",
    "is the CDF of the *standard Normal*, that is a Gausian RV with zero mean and unit variance. Thus CDF of Z is\n",
    "\n",
    "$$F_Z\\left(z\\right) = \\Phi\\left(z\\right) \\cdot \\Phi\\left(\\frac{z-3}{4}\\right)$$\n",
    "\n",
    "Now we can obtain the PDF of **Z** by applying the [Fundamental Thoerem of Calculus](http://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus) and the [chain rule](http://en.wikipedia.org/wiki/Chain_rule) to obtain\n",
    "\n",
    "$$\\begin{eqnarray}f_Z\\left(z\\right) &=& \\Phi\\left(z\\right) \\cdot \\frac{d}{dz}\\Phi\\left(\\frac{z-3}{4}\\right) + \\Phi\\left(\\frac{z-3}{4}\\right) \\cdot \\frac{d}{dz}\\Phi\\left(z\\right) \\cr\n",
    "&=& \\Phi\\left(z\\right)\\cdot \\frac{1}{4}\\cdot f_Z\\left(\\frac{z-3}{4}\\right) +\\Phi\\left(\\frac{z-3}{4}\\right)\\cdot f_Z\\left(z\\right) \n",
    "\\end{eqnarray}$$\n",
    "\n",
    "where\n",
    "\n",
    "$$f_Z\\left(z\\right) = \\frac{1}{\\sqrt{2\\pi}} e^{-z^2/2}$$\n",
    "\n",
    "Below we attempt to confirm (technically we are only \"not contradicting\") this result via simulation. We will take *N* observations of **Z** for some *large N* and determine if the observed distribution *closely matched* the predicted one. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x107008f10>]"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import scipy.stats\n",
    "numSamples = 20000\n",
    "\n",
    "def fZ(z):\n",
    "    rv = scipy.stats.norm(loc=0, scale=1) #standard normal\n",
    "    z1 = (z-3)/(4.0)\n",
    "    return rv.cdf(z)*rv.pdf(z1)/(4.0) + rv.cdf(z1)*rv.pdf(z)\n",
    "\n",
    "raynge = [(-3 + i/10.0) for i in range(180)]\n",
    "predicted = [fZ(z) for z in raynge]\n",
    "n1 = scipy.stats.norm(loc=0, scale=1)\n",
    "n2 = scipy.stats.norm(loc=3, scale =4)\n",
    "\n",
    "X1 = n1.rvs(size=numSamples)\n",
    "X2 = n2.rvs(size=numSamples)\n",
    "Z = [max(X1[i],X2[i]) for i in range(numSamples)]\n",
    "\n",
    "fig = pyplot.figure()\n",
    "ax = fig.add_subplot(111)\n",
    "\n",
    "n, bins, patches = ax.hist(Z, 100, normed=1, facecolor='green', alpha=0.75)\n",
    "ax.plot(raynge,predicted,'r', linewidth=3)\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
